#ifndef WINDOW_H
#define WINDOW_H

#include <QtGui>
#include <QtSql>
#include "word.h"
#include "ResultItem.h"
#include "PrefWindow.h"
using namespace std;

class Word;

class InputWin : public QWidget {

Q_OBJECT
  public:
    InputWin(QWidget *parent = 0);
    QSettings settings;
    Word * noun;
    Word * verb;
    Word * aux;
    PrefWindow * prefWin;
    QSqlDatabase db;
    bool auxOn;
    void toggleAux(bool show);
    void run();
    bool checkVerbAux(string path);
    int getNounType(ResultItem * item);
  protected:
    bool eventFilter(QObject * obj, QEvent * e);
  private:
    void keyPressEvent(QKeyEvent * event);
  public slots:
    void summoned();
    void verbChanged();
    void nounChanged();
    void entered();
    void showPref();
    void trayActivation(QSystemTrayIcon::ActivationReason reason);
  signals:
    void enter();
};

#endif